import { get, post } from './https'

// 菜单模块--------------
// 添加
export const reqmenuAdd = params => post('/api/menuadd', params)

// 列表
export const reqmenuList = params => get('/api/menulist', params)

// 取一条详情
export const reqmenuInfo = params => get('/api/menuinfo', params)

// 修改
export const reqmenuEdit = params => post('/api/menuedit', params)

// 删除
export const reqmenudelete = params => post('/api/menudelete', params)


// 角色管理模块--------------
// 角色列表
export const reqrolelist = params => get('/api/rolelist', params)

// 角色添加
export const reqroleadd = params => post('/api/roleadd', params)

// 角色删除
export const reqroledelete = params => post('/api/roledelete', params)

// 获取一条数据
export const reqroleinfo = params => get('/api/roleinfo', params)

// 修改数据
export const reqroleedit = params => post('/api/roleedit', params)


// 管理员模块
// 添加
export const requseradd = params => post('/api/useradd', params)

// 管理员列表
export const requserlist = params => get('/api/userlist', params)

// 管理员总数
export const requsercount = params => get('/api/usercount', params)

// 获取一条管理员的消息
export const requserinfo = params => get('/api/userinfo', params)

// 修改一条管理员信息
export const requseredit = params => post('/api/useredit', params)

// 删除
export const requserdelete = params => post('/api/userdelete', params)



// 登录
export const requserlogin = params => post('/api/userlogin', params)


// 商品分类
export const reqcateadd = params => post('/api/cateadd', params, true)

// 商品列表
export const reqcatelist = params => get('/api/catelist', params)

// 获取一条数据
export const reqcateinfo = params => get('/api/cateinfo', params)

//修改
export const reqcateedit = params => post('/api/cateedit', params, true)

// 删除
export const reqcatedelete = params => post('/api/catedelete', params)




// 商品规格管理
export const reqspecsadd = params => post('/api/specsadd', params)


// 请求列表
export const reqspecslist = params => get('/api/specslist', params)


// 请求总数
export const reqspecscount = params => get('/api/specscount', params)

// 获取一条数据
export const reqspecsinfo = params => get('/api/specsinfo', params)

// 修改列表
export const reqspecsedit = params => post('/api/specsedit', params)

// 删除
export const reqspecsdelete = params => post('/api/specsdelete', params)



// 轮播图-------------------------
export const reqbanneradd = params => post('/api/banneradd', params, true)

// 列表
export const reqbannerlist = params => get('/api/bannerlist', params, true)

// 拿到一张轮播图的数据
export const reqbannerinfo = params => get('/api/bannerinfo', params)

// 轮播图修改
export const reqbanneredit = params => post('/api/banneredit', params, true)

// 删除
export const reqbannerdelete = params => post('/api/bannerdelete', params)


// 商品管理模块--------------
// 添加
export const reqgoodsadd = params => post('/api/goodsadd', params, true)

//列表
export const reqgoodslist = params => get("/api/goodslist", params)

//删除
export const reqgoodsdelete = params => post("/api/goodsdelete", params)

//详情
export const reqgoodsinfo = params => get("/api/goodsinfo", params)

//修改
export const reqgoodsedit = params => post("/api/goodsedit", params, true)

//总数
export const reqgoodscount = () => get("/api/goodscount")

// 会员模块-----------------
// 获取一条数据
export const reqmemberinfo = params => get('/api/memberinfo', params)


// 获取列表
export const reqmemberlist = params => get('/api/memberlist', params)

// 修改一条数据
export const reqmemberedit = params => post('/api/memberedit', params)




//秒杀模块--------------------- 
// 秒杀时间的添加
export const reqseckilladd = params => post('/api/seckadd', params)

// 获取列表
export const reqseckilllist = params => get('/api/secklist', params)

// 删除
export const reqseckilldelete = params => post('/api/seckdelete', params)


// 获取一条数据
export const reqseckillinfo = params => get('/api/seckinfo', params)


// 编辑
export const reqseckilledit = params => post('/api/seckedit', params)



